//
//  CZAccountSecureController.m
//  TCProject
//
//  Created by admin on 16/2/2.
//  Copyright © 2016年 wise-wing. All rights reserved.
//

#import "CZAccountSecureController.h"
#import "ZDModifyPasswordController.h"

@interface CZAccountSecureController ()

@end

@implementation CZAccountSecureController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"账号安全";
    self.view.backgroundColor = BMColor(245, 245, 247, 1);
    self.tableView.tableFooterView = [[UIView alloc] init];
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

   }


#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
        cell.textLabel.font = [UIFont systemFontOfSize:13.f];
        cell.textLabel.textColor = BMColor(102, 102, 102, 1);
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    if (indexPath.row) {
        cell.textLabel.text = @"修改安全码";
    } else {
        cell.textLabel.text = @"修改登录密码";
    }
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    UIViewController *modifyVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:indexPath.item == 0 ? @"modifyPasswordVC" : @"modifySecureCodeVC"];
    [self showViewController:modifyVC sender:nil];
}

@end
